package client.core.validation.matchers;

import org.junit.*;

public class PortMatcherTes {
	@Test
	public void checkIsValidTest() {
		PortMatcher portMatcher = new PortMatcher();
		//maximum port posible
		Assert.assertTrue(portMatcher.checkIsValid("65535"));
		Assert.assertTrue(portMatcher.checkIsValid("3213"));
		Assert.assertTrue(portMatcher.checkIsValid("1"));
		
		Assert.assertFalse(portMatcher.checkIsValid("edwd"));
		Assert.assertFalse(portMatcher.checkIsValid("21 . "));
		Assert.assertFalse(portMatcher.checkIsValid(""));
		Assert.assertFalse(portMatcher.checkIsValid(null));
	}
}
